import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { decorateModuleRef } from './app/environment';
import { bootloader } from '@angularclass/hmr';
/*
 * App Module
 * our top level module that holds all of our components
 */

export const appStart = ()=>{
  /*
  * Bootstrap our Angular app with a top level NgModule
  */
  function main(): Promise<any> {
    return platformBrowserDynamic()
      .bootstrapModule(require('./app/app.module').AppModule)
      .then(decorateModuleRef)
      .catch((err) => console.error(err));
  }

  // needed for hmr
  // in prod this is replace for document ready
  bootloader(main);
}


